var user = functions.ParseJSON(functions.GetItemInLocalStorage('user'));
// user = {
//         "AccessToken": null,
//         "Birthday": null,
//         "Email": "email",
//         "Id": 7,
//         "LastConnection": null,
//         "Password": null,
//         "Pays": "pays",
//         "Picture": null,
//         "Sexe": null,
//         "Token": "a13d88e778c25165824f4758280bcdb55b0c24897991bf8a2146929c48f69df5",
//         "Username": "Pseudo"
//     };
var local = 'http://192.168.0.10:61662/Flingz.svc/';
var beta = 'http://wsflingz.azurewebsites.net/Flingz.svc/';
var serv = local;
var req;
var salt = 't8!g312?vspm';
var connectionString = "Endpoint=sb://flingz.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=S7W5hQxAR3iA3HXV7VGS4PiQxestSIJYCCKZBzwirBY=";
//var connectionString = "Endpoint=sb://flingz.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=nCddx/L+eQ95v10Tir3T21JGnpIld/WAV0zr5e1BOAg=";
var notificationHubPath = "flingz";
var hub = functions.ParseJSON(functions.GetItemInLocalStorage('hub'));
/*var request = {
    "Sign":"test",
    "User":1
};*/


var module = angular.module('Flingz', ['ngRoute', 'appControllers']).
    config(['$routeProvider', function ($routeProvider, $routeParams) {
        $routeProvider
            .when('/', {
                templateUrl: functions.GetMenu(user),
                controller: 'HomeController'
            })
            .when('/camera', {
                controller: 'CameraController',
                templateUrl: 'views/camera.html',
                animation: 'slide'
            })
            .when('/circle', {
                controller: 'CircleController',
                templateUrl: 'views/circle.html',
                animation: 'slide'
            })
            .when('/user/:id', {
                controller: 'UserController',
                templateUrl: 'views/user.html',
                animation: 'slide'
            })
            .when('/followed', {
                controller: 'UserController',
                templateUrl: 'views/follow.html',
                animation: 'slide'
            })
            .when('/follower', {
                controller: 'UserController',
                templateUrl: 'views/follow.html',
                animation: 'slide'
            })
            .otherwise({ redirectTo: '/' });
    }], function ($sceDelegateProvider) {
        $sceDelegateProvider.resourceUrlWhitelist(['.*']);
    });
